﻿using UnityEngine;

namespace Framework
{
    public class Chunk
    {
        public static readonly Vector3Int size = new Vector3Int(32, 32, 32);

        public BlockType[,,] blocks = new BlockType[size.x + 1, size.y, size.z + 1];
        //public Entity[] entities;
        public Vector3Int position;

        public ref BlockType At(Vector3Int pos) { return ref blocks[pos.x, pos.y, pos.z]; }

        public Vector3Int PositionInWorld(Vector3Int pos)
        {
            return pos + position;
        }
    }
}